<?php

declare(strict_types=1);

namespace ImiApp\ApiServer\Api\Model\Base;

use Imi\Config\Annotation\ConfigValue;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\Table;
use ImiApp\ImiServer\AbstractModel as Model;

/**
 * 设置列表 基类.
 *
 * @Entity(camel=false, bean=true, incrUpdate=false)
 * @Table(name=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\Com1set.name", default="fa_com1set"), usePrefix=false, id={"id"}, dbPoolName=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\Com1set.poolName"))
 * @DDL(sql="CREATE TABLE `fa_com1set` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '类型ID',
  `setcate_id` int(10) unsigned DEFAULT '1' COMMENT '设置分类',
  `set_id` int(10) unsigned DEFAULT NULL COMMENT '类型id',
  `com1_id` int(10) unsigned DEFAULT NULL COMMENT '模块id',
  `name` varchar(255) DEFAULT NULL COMMENT '类型名',
  `val` int(10) unsigned DEFAULT '0' COMMENT '值',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='设置列表'", decode="")
 *
 * @property int|null $id 类型ID
 * @property int|null $setcateId 设置分类
 * @property int|null $setId 类型id
 * @property int|null $com1Id 模块id
 * @property string|null $name 类型名
 * @property int|null $val 值
 * @property int|null $createtime 创建时间
 * @property int|null $updatetime 更新时间
 * @property int|null $deletetime 删除时间
 */
abstract class Com1setBase extends Model
{
    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEY = 'id';

    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEYS = ["id"];

    /**
     * 类型ID.
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $id = NULL;

    /**
     * 获取 id - 类型ID.
     *
     * @return int|null
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * 赋值 id - 类型ID.
     * @param int|null $id id
     * @return static
     */
    public function setId($id)
    {
        $this->id = null === $id ? null : (int)$id;
        return $this;
    }

    /**
     * 设置分类.
     * setcate_id
     * @Column(name="setcate_id", type="int", length=10, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $setcateId = 1;

    /**
     * 获取 setcateId - 设置分类.
     *
     * @return int|null
     */
    public function getSetcateId(): ?int
    {
        return $this->setcateId;
    }

    /**
     * 赋值 setcateId - 设置分类.
     * @param int|null $setcateId setcate_id
     * @return static
     */
    public function setSetcateId($setcateId)
    {
        $this->setcateId = null === $setcateId ? null : (int)$setcateId;
        return $this;
    }

    /**
     * 类型id.
     * set_id
     * @Column(name="set_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $setId = NULL;

    /**
     * 获取 setId - 类型id.
     *
     * @return int|null
     */
    public function getSetId(): ?int
    {
        return $this->setId;
    }

    /**
     * 赋值 setId - 类型id.
     * @param int|null $setId set_id
     * @return static
     */
    public function setSetId($setId)
    {
        $this->setId = null === $setId ? null : (int)$setId;
        return $this;
    }

    /**
     * 模块id.
     * com1_id
     * @Column(name="com1_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $com1Id = NULL;

    /**
     * 获取 com1Id - 模块id.
     *
     * @return int|null
     */
    public function getCom1Id(): ?int
    {
        return $this->com1Id;
    }

    /**
     * 赋值 com1Id - 模块id.
     * @param int|null $com1Id com1_id
     * @return static
     */
    public function setCom1Id($com1Id)
    {
        $this->com1Id = null === $com1Id ? null : (int)$com1Id;
        return $this;
    }

    /**
     * 类型名.
     * name
     * @Column(name="name", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $name = NULL;

    /**
     * 获取 name - 类型名.
     *
     * @return string|null
     */
    public function getName(): ?string
    {
        return $this->name;
    }

    /**
     * 赋值 name - 类型名.
     * @param string|null $name name
     * @return static
     */
    public function setName($name)
    {
        $this->name = null === $name ? null : (string)$name;
        return $this;
    }

    /**
     * 值.
     * val
     * @Column(name="val", type="int", length=10, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $val = 0;

    /**
     * 获取 val - 值.
     *
     * @return int|null
     */
    public function getVal(): ?int
    {
        return $this->val;
    }

    /**
     * 赋值 val - 值.
     * @param int|null $val val
     * @return static
     */
    public function setVal($val)
    {
        $this->val = null === $val ? null : (int)$val;
        return $this;
    }

    /**
     * 创建时间.
     * createtime
     * @Column(name="createtime", type="bigint", length=16, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $createtime = NULL;

    /**
     * 获取 createtime - 创建时间.
     *
     * @return int|null
     */
    public function getCreatetime(): ?int
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间.
     * @param int|null $createtime createtime
     * @return static
     */
    public function setCreatetime($createtime)
    {
        $this->createtime = null === $createtime ? null : (int)$createtime;
        return $this;
    }

    /**
     * 更新时间.
     * updatetime
     * @Column(name="updatetime", type="bigint", length=16, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $updatetime = NULL;

    /**
     * 获取 updatetime - 更新时间.
     *
     * @return int|null
     */
    public function getUpdatetime(): ?int
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间.
     * @param int|null $updatetime updatetime
     * @return static
     */
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = null === $updatetime ? null : (int)$updatetime;
        return $this;
    }

    /**
     * 删除时间.
     * deletetime
     * @Column(name="deletetime", type="bigint", length=16, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $deletetime = NULL;

    /**
     * 获取 deletetime - 删除时间.
     *
     * @return int|null
     */
    public function getDeletetime(): ?int
    {
        return $this->deletetime;
    }

    /**
     * 赋值 deletetime - 删除时间.
     * @param int|null $deletetime deletetime
     * @return static
     */
    public function setDeletetime($deletetime)
    {
        $this->deletetime = null === $deletetime ? null : (int)$deletetime;
        return $this;
    }

}
